<%include("/common/list-top.html",{title:"项目管理",css:[

ctxPath +"/css/plan.css",
ctxPath + "/zui/dist/lib/datatable/zui.datatable.min.css",
 ctxPath+"/zui/dist/lib/chosen/chosen.min.css",
 ctxPath+"/zui/dist/lib/uploader/zui.uploader.min.css",
 ctxPath+"/zui/dist/lib/datetimepicker/datetimepicker.min.css"]}){} %>


<div class="container-fluid">
    	<div class="page-head-nav">
		<div class="row">
			<div class="col-xs-11">
				<ol class="breadcrumb">
					<li><a href="${ctxPath}"><i class="icon icon-home"></i>工作台</a></li>
					<li>项目计划管理</li>
					<li><a href="${ctxPath}/project">项目管理</a></li>
					<li class="active">${title!}</li>
				</ol>
			</div>
		</div>
	</div>
	

    <!-- 编辑项目 -->
    <form method="post" id="projectForm">
					<input type="hidden" name="id"  value="${project.id!}"><!-- 项目id -->
					
					<div style="height:20px"></div>
					<div class="row">
						<div class="col-xs-1">
							<label for="projectCode">项目编码</label>
						</div>
						<div class="col-xs-3">
							<input type="text" class="form-control" name="projectCode"
								  value ="${project.projectCode!}"   readonly>
						</div>
					

						<div class="col-xs-1">
							<label for="companyName">所属公司</label>
						</div>
						<div class="col-xs-3">
							<input type="text" class="form-control" name="companyName"
								  value ="${project.companyName!}"  readonly>
						</div>
						
						<div class="col-xs-1">
							<label for="creatorName">创建人</label>
						</div>
						<div class="col-xs-3">
							<input type="text" class="form-control" name="creatorName"
								 value ="${project.creatorName!}" readonly>
						</div>
					</div>
					
					<div style="height:20px"></div>
					<div class="row">
						<div class="col-xs-1">
							<label for="projectName">项目名称</label>
						</div>
						<div class="col-xs-3">
							<input type="text" class="form-control" name="projectName"
								 value ="${project.projectName!}" placeholder="请输入项目名称">
						</div>
						
						<div class="col-xs-1">
							<label for="managerId">项目管理员</label>
						</div>
						<div class="col-xs-3">
								 <select data-placeholder="选择项目管理员" class="chosen-select form-control" tabindex="2" multiple=""  name="managerId" id="managerId"  >
									  <% for(member in members){ %>
											  <option  ${ strutil.contain (managerIdStr,member.id) ? "selected='selected'" }value="${member.id}">${member.nick!}</option>
									  <% } %>
								</select>
						</div>

						<div class="col-xs-1">
							<label for="member_name">项目成员</label>
						</div>
						<div class="col-xs-3">
								 <select class="chosen-select form-control" tabindex="2" multiple="" name="memberId" id="memberId"  >
									  <% for(member in members){ %>
											  <option  ${ strutil.contain (memberIdStr,member.id) ? "selected='selected'" }value="${member.id}">${member.nick!}</option>
									  <% } %>
								</select>
						</div>
					</div>
					<div style="height:20px"></div>
					<div class="row">
						<div class="col-xs-1">
							<label for="projectDesc">项目简介</label>
						</div>
						<div class="col-xs-11">
							<textarea class="form-control" name="projectDesc" id="projectDesc" value ="${project.projectDesc!}">${project.projectDesc!}</textarea>
						</div>
					</div>
					<div style="height:10px"></div>
						<div>
							<div class="col-xs-11"></div>
							<div class="col-xs-1">
									<a class="btn btn-primary"  id="updateProject" >保存项目</a>
								</div>
						</div>
				</form>

    <div style="height:50px"></div>
    

    <!-- 计划列表 -->
    <div class="row gezi" id="planManage" >
        <div class="col-xs-12">
            <div class="panel">
                <div class="panel-heading">
                    计划管理
                    <div style="display: inline-block;text-align: right;float: right;">
                        <a class="btn btn-link" type="button" id="addPlanBtn">新增计划</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
                
                <div class="row listui" id="plan">
				<div class="col-xs-12 ">

					<#listTable url="${ctxPath}/plan"
						fields="plan_code,计划编码,no-sort,no-query|transport_type_name,运输方式,10%,no-sort,no-query|start_place_name,起始地,no-sort,no-query|destination_name,目的地,no-sort,query|start_date,开始日期,8%,sort,no-query|end_date,结束日期,8%,sort,no-query|started,状态,5.5%,no-sort,no-query" />
				</div>
			</div>
                
            </div>
        </div>
        
    </div>
    
<!-- 新增计划面板 -->
<div class="modal fade" id="addPlanModal" tabindex="-1" role="dialog">
	<div class="modal-dialog " style="width: 600px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">新建计划</h4>
			</div>
			<div class="modal-body">

				<form method="post" id="planForm">
				
					<input type="hidden" name="id" id="planId"><!-- 计划ID -->
					<input type="hidden" name="projectId" ><!-- 项目ID -->
					<input type="hidden" name="projectName"><!-- 项目名称 -->
					<div class="row">
						<div class="col-xs-2">
							<label for="planCode">计划编码</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" name="planCode" id="planCode" readonly>
						</div>
					</div>
					<div style="height: 15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="templateId">计划模板</label>
						</div>
						<div class="col-xs-8">
							<select   class="form-control" name="templateId" id="templateId" >
								
							</select>	
						</div>
					</div>
					<div style="height: 15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="remark">计划描述</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" name="remark" id="remark">
						</div>
					</div>
					<div style="height: 15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="startPlace">起始地</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" id="startPlace"  readonly>
						</div>
					</div>
					<div style="height: 15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="endPlace">目的地</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" id="endPlace" readonly>
						</div>
					</div>
					<div style="height: 15px;"></div>

					<div class="row">
						<div class="col-xs-2">
							<label for="startDate">开始日期</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control form-date" name="startDate" id="startDate" placeholder="请点击此处选择开始日期" readonly>
						</div>
					</div>
					<div style="height: 15px;"></div>

					<div class="row">
						<div class="col-xs-2">
							<label for="endDate">结束日期</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control form-date" name="endDate" id="endDate" placeholder="请点击此处选择结束日期" readonly>
						</div>
					</div>
					<div style="height: 15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="weekPolicy">周末天数</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control number" name="weekPolicy" id="weekPolicy" placeholder="请输入周末天数">
						</div>
					</div>
					<div style="height:15px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="holidayPolicy">假日天数</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control number" name="holidayPolicy" id="holidayPolicy" placeholder="请输入假日天数">
						</div>
					</div>
					
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" id="updatePlanBtn" class="btn btn-primary">保存</button>
				<button type="button" id="savePlanBtn" class="btn btn-primary">保存</button>
			</div>
		</div>
	</div>
</div>
    


<!-- 箱单物料导入导出 -->
<div class="modal fade" id="xiangdanImport" tabindex="-1" role="dialog">
	<div class="modal-dialog " style="width: 500px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">物料箱单导入</h4>
			</div>
			<div class="modal-body">
				    <h5>请先<a href="javascript:void(0)" id="templateDownload" >下载模板</a>,按照格式要求添加箱单物料信息</h5>
				    <div style="height: 10px;"></div>
			    <div class="row gezi">
			        <div class="col-xs-12">
			            <div id="uploaderExample" class="uploader">
			              <!--   <button type="button" class="btn btn-info " id="templateDownload"><i class="icon icon-cloud-download"></i> 模板下载</button>
			                <div style="height: 10px;"></div> -->
			                <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
			                <button type="button" class="btn btn-primary uploader-btn-browse pull-right"><i class="icon icon-cloud-upload"></i> 物料箱单导入</button>
			                <div style="height: 20px;"></div>
			            </div>
			        </div>
			    </div>

			</div>
		</div>
	</div>
</div>


    <!-- 箱单管理 -->
    <div class="row gezi" id="packingListManage"  >
        <div class="col-xs-12">
            <div class="panel">
                <div class="panel-heading">
                    箱单管理
                    <div style="display: inline-block;text-align: right;float: right;">
                        <a class="btn btn-link" type="button" id="addPackingListBtn">添加箱单</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
                
                <div class="row listui" id="packingList">
				<div class="col-xs-12 ">

					<#listTable url="${ctxPath}/packingList"
						fields="packing_list_code,箱单编码,no-sort,no-query|owner,所有者,8%,sort,query|shipper,发货人,8%,no-sort,no-query|receiver,收货人,8%,no-sort,no-query|start_place,起始地,no-sort,no-query|destination,目的地,no-sort,no-query|take_photo,强制拍照,6.5%,no-sort,no-query" />
				</div>
			</div>
            </div>
        </div>
    </div>
    
    <!-- 添加箱单模态框 -->
    <div class="modal fade" id="addPackingListModal" tabindex="-1" role="dialog">
	<div class="modal-dialog " style="width: 500px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">新建箱单</h4>
			</div>
			<div class="modal-body">

				<form method="post" id="packingListForm">
				<input type="hidden" name="planId"><!-- 计划id的隐藏域 -->
				<input type="hidden" name ="id">
					<div class="row">
						<div class="col-xs-2">
							<label for="packingListCode">箱单编码</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" name="packingListCode" id="packingListCode" readonly>
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="owner">所有者</label>
						</div>
						<div class="col-xs-8">
							<input type="text" class="form-control" name="owner" id="owner" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="shipper">发货人</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control" name="shipper" id="shipper" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="receiver">收货人</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control" name="receiver" id="receiver" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="emptyWeight">净重(kg)</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control number" name="emptyWeight" id="emptyWeight" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="grossWeight">毛重(kg)</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control number" name="grossWeight" id="grossWeight" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="volume">体积(cm³)</label>
						</div>
						<div class="col-xs-8">
								<input type="text" class="form-control bignumber" name="volume" id="volume" >
						</div>
					</div>
					<div style="height: 5px;"></div>
					<div class="row">
						<div class="col-xs-2">
							<label for="takePhoto">强制拍照</label>
						</div>
						<div class="col-xs-8">
							<select class="form-control" name="takePhoto" id="takePhoto"  >
							<option selected="selected" disabled="disabled" style='display: none' value=''></option>
								<option value="0">是</option>
								<option value="1">否</option>
							</select>
						</div>
					</div>
					
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" id="updatePackingListBtn" class="btn btn-primary">保存</button>
				<button type="button" id="savePackingListBtn" class="btn btn-primary">保存</button>
			</div>
		</div>
	</div>
</div>


<!-- 箱单内的物料列表展示框 -->
    <div class="modal fade" id="materielModal" tabindex="1" role="dialog">
	<div class="modal-dialog" style="width: 1024px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">物料信息</h4>
			</div>
			<div class="modal-body">
			
			<div class="panel">
                <div class="panel-heading">
               		 <div style="display: inline-block;text-align: left;float: left;">
                        <a class="btn btn-link excel"  type="button" id="excle">报表导出</a>
                    </div>
                    <div style="display: inline-block;text-align: right;float: right;">
                        <a class="btn btn-link" type="button" id="addPackingListMaterielBtn">添加物料</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
			<div class="row listui" id="materielList">
				<div class="col-xs-12 ">
					<#listTable url="${ctxPath}/packingListMateriel"
						fields="materiel_name,名称,no-sort,no-query|materiel_code,物料编码,sort,query|materiel_amount,数量(件),7%,no-sort,no-query|materiel_gross_weight,重量(kg),no-sort,no-query|materiel_length,长度(cm),no-sort,no-query|materiel_width,宽度(cm),no-sort,no-query|materiel_height,高度(cm),no-sort,no-query|materiel_volume,体积(cm³),no-sort,no-query|take_photo,强制拍照,7%,no-sort,no-query|materiel_qrcode,二维码,6%,no-sort,no-query" />
				</div>
			</div>
			
			</div>
			</div>
		</div>
	</div>
</div>
 
 
 <!-- 添加物料信息面板 -->
 <div class="modal fade" id="addMaterielModal" tabindex="1" role="dialog">
	<div class="modal-dialog" style="width: 600px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">物料添加信息</h4>
			</div>
			<div class="modal-body">
			
			<form method="post" id="packingListMaterielForm">
			<!-- 设置隐藏域.存箱单ID和编码 -->
			<input type="hidden" name="packingListId">
			<input type="hidden" name="packingListCode">
			
			<div style="height: 20px;"></div>
			<div class="row">
			
				<div class="col-xs-2">
					<label for="materielCode">选择物料</label>
				</div>
				<div class="col-xs-8">
					<input class="f4" type="text" id="materielCode"  name="materielCode" commitFormat="materielCode" 
					 table="getMaterielCodeByCompanyId" displayFormat="materielName" urlParams=''/>
				</div>
			</div>
			<div style="height: 20px;"></div>
			<div class="row">
				<div class="col-xs-2">
					<label for="materielAmount">物料数量</label>
				</div>
				<div class="col-xs-8">
					<input type="number" class="form-control number" name="materielAmount" id="materielAmount"  placeholder="请输入物料数量" oninput="amountChange()">
				</div>
			</div>
			<div style="height: 20px;"></div>
			<div class="row">
				<div class="col-xs-2">
					<label for="materielAmount">二维码信息</label>
				</div>
				<div class="col-xs-8">
					<input type="text" class="form-control" name="materielQrcode" id="materielQrcode"  placeholder="请输入二维码信息,当数量大于1将启用系统默认二维码" >
				</div>
			</div>
			<div style="height: 20px;"></div>
			<div class="row">
						<div class="col-xs-2">
							<label for="takePhoto">是否强制拍照</label>
						</div>
						<div class="col-xs-8">
							<select class="form-control" name="takePhoto"  >
							<option selected="selected" disabled="disabled" style='display: none' value=''></option>
								<option value="0">是</option>
								<option value="1">否</option>
							</select>
						</div>
				</div>
			<div style="height: 20px;"></div>
			</form>
			</div>
			
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" id="savePackingListMateriel" class="btn btn-primary">保存</button>
			</div>
			
		</div>
	</div>
</div>   
   

<!-- 打尺记录展示框 -->
 <div class="modal fade" id="ruleRecordModal" tabindex="2" role="dialog">
	<div class="modal-dialog"   style="width: 900px">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">打尺记录</h4>
			</div>
			<div class="modal-body">
					<table class="table datatable table-bordered table-hove align-md">
										<thead>
											<tr>
												<th>位置</th>
												<th>打尺时间</th>
												<th width="10%">净重(kg)</th>
												<th width="10%">长度(cm)</th>
												<th width="10%">宽度(cm)</th>
												<th width="10%">高度(cm)</th>
												<th>描述</th>
												<th>照片</th>
											</tr>
										</thead>
										<tbody id="ruleRecord">

										</tbody>
									</table>
							</div>
						</div>
					</div>
				</div>
				
<!-- 强制拍照展示框 -->
 <div class="modal fade" id="planbizModal" tabindex="2" role="dialog">
	<div class="modal-dialog"   style="width: 900px">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">业务记录</h4>
			</div>
			<div class="modal-body">
					<table class="table datatable table-bordered table-hove align-md">
										<thead>
											<tr>
												<th>位置</th>
												<th width="15%">相关容器</th>
												<th width="8%">业务类型</th>
												<th width="17%">业务时间</th>
												<th width="10%">业务人员</th>
												<th>照片</th>
											</tr>
										</thead>
										<tbody id="planBiz">

										</tbody>
									</table>
							</div>
						</div>
					</div>
				</div>
				
				

<!-- 物料二维码 -->
<div class="modal fade" id="qrcodeModal" tabindex="-1" role="dialog" >
		<div class="modal-dialog modal-sm" >
			<div class="modal-content">
				<div class="modal-header" >
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title">二维码</h4>
				</div>
				<div class="modal-body">
					<div id="code"></div>
				</div>
				 <div class="modal-footer">
					
				</div> 
			</div>
		</div>
	</div>
	
<!-- 打尺图片 -->
<div class="modal fade" id="recordPicModal" tabindex="-1" role="dialog" >
		<div class="modal-dialog modal-fullscreen" style="width: 400px">
			<div class="modal-content">
				<div class="modal-header" style="">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title" >打尺图片</h4>
				</div>
				<div class="modal-body">
					<img id="recordPic"></img>
				</div>
				 <div class="modal-footer">
				</div> 
			</div>
		</div>
	</div>

<!-- 强制拍照图片 -->
<div class="modal fade" id="forcedPhotoModal" tabindex="-1" role="dialog" >
		<div class="modal-dialog modal-fullscreen" style="width: 400px">
			<div class="modal-content">
				<div class="modal-header" style="">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title" >打尺图片</h4>
				</div>
				<div class="modal-body">
					<img id="forcedPhoto"></img>
				</div>
				 <div class="modal-footer">
					
				</div> 
			</div>
		</div>
	</div>
</div>

<%include("/common/list-bottom.html",{js:[ 
ctxPath + "/zui/dist/lib/datatable/zui.datatable.min.js", 
ctxPath+"/zui/dist/lib/chosen/chosen.min.js",
ctxPath+"/zui/dist/lib/uploader/zui.uploader.min.js",
ctxPath+"/zui/dist/lib/datetimepicker/datetimepicker.min.js",
ctxPath+"/blockui/jquery.blockui.min.js", 
ctxPath+"/blockui/app.js",
ctxPath + "/js/plugin-f4.js",
ctxPath + "/js/jquery.qrcode.min.js",
ctxPath +"/js/projectPlanManage/editProject.js"]}){}
%>